<div id="content">

    <div id="content-header">

        <div id="breadcrumb"><a href="<?php echo site_url('Login/login') ?>" title="Go to Home" class="tip-bottom"><i
                class="icon-home"></i> 主页</a> <a href="#" class="current">权限管理</a></div>

        <h1>页面权限列表</h1>

    </div>

    <div class="container-fluid">

        <hr>

        <div class="row-fluid">
            <div class="span12">
                <form action="<?php echo site_url('auth/doUserPage') ?>" method="post" class="form-horizontal">
                    <div class="widget-box">
                        <div class="widget-title"> <span class="icon"><i
                                class="icon-user"></i></span>
                            <h5><?php echo ($data[2]['name'])?></h5>
                        </div>
                    </div>
                    <div class="widget-box collapsible">
                        <div class="widget-title"><a href="#collapseOne" data-toggle="collapse"> <span class="icon"><i
                                class="icon-arrow-right"></i></span>
                            <h5>用户管理</h5>
                        </a></div>
                        <div class="collapse in" id="collapseOne">
                            <table class="table table-bordered table-striped with-check">
                                <thead>
                                </thead>
                                <tbody>
                                <?php
                            $rows=$data[0];
                            foreach($rows as $value):
                            if($value['superior_id']==2):
                            ?>
                                <tr>
                                    <td><input name='page[]' type="checkbox" value="<?php echo $value['id']; ?>"/></td>
                                    <td><?php echo $value['pagename'];?></td>
                                </tr>
                                <?php
                                endif;
                                endforeach; ?>
                                </tbody>
                            </table>
                        </div>

                        <div class="widget-title"><a href="#collapseTwo" data-toggle="collapse"> <span class="icon"><i
                                class="icon-arrow-right"></i></span>
                            <h5>财务管理</h5>
                        </a></div>
                        <div class="collapse" id="collapseTwo">
                            <table class="table table-bordered table-striped with-check">
                                <thead>
                                </thead>
                                <tbody>
                                <?php
                            $rows=$data[0];
                            foreach($rows as $value):
                            if($value['superior_id']==3):
                            ?>
                                <tr>
                                    <td><input name='page[]' type="checkbox" value="<?php echo $value['id']; ?>"/></td>
                                    <td><?php echo $value['pagename'];?></td>
                                </tr>
                                <?php
                                endif;
                                endforeach; ?>
                                </tbody>
                            </table>
                        </div>

                        <div class="widget-title"><a href="#collapseThree" data-toggle="collapse"> <span class="icon"><i
                                class="icon-arrow-right"></i></span>
                            <h5>订单管理</h5>
                        </a></div>
                        <div class="collapse" id="collapseThree">
                            <table class="table table-bordered table-striped with-check">
                                <thead>
                                </thead>
                                <tbody>
                                <?php
                            $rows=$data[0];
                            foreach($rows as $value):
                            if($value['superior_id']==4):
                            ?>
                                <tr>
                                    <td><input type="checkbox" name='page[]' value="<?php echo $value['id']; ?>"/></td>
                                    <td><?php echo $value['pagename'];?></td>
                                </tr>
                                <?php
                                endif;
                                endforeach; ?>
                                </tbody>
                            </table>
                        </div>

                        <div class="widget-title"><a href="#collapseFour" data-toggle="collapse"> <span class="icon"><i
                                class="icon-arrow-right"></i></span>
                            <h5>运营管理</h5>
                        </a></div>
                        <div class="collapse" id="collapseFour">
                            <table class="table table-bordered table-striped with-check">
                                <thead>
                                </thead>
                                <tbody>
                                <?php
                            $rows=$data[0];
                            foreach($rows as $value):
                            if($value['superior_id']==5):
                            ?>
                                <tr>
                                    <td><input type="checkbox" name='page[]' value="<?php echo $value['id']; ?>"/></td>
                                    <td><?php echo $value['pagename'];?></td>
                                </tr>
                                <?php
                                endif;
                                endforeach; ?>
                                </tbody>
                            </table>
                        </div>
                        <div class="widget-title"><a href="#collapseFive" data-toggle="collapse"> <span class="icon"><i
                                class="icon-arrow-right"></i></span>
                            <h5>客服工作台</h5>
                        </a></div>
                        <div class="collapse" id="collapseFive">
                            <table class="table table-bordered table-striped with-check">
                                <thead>
                                </thead>
                                <tbody>
                                <?php
                            $rows=$data[0];
                            foreach($rows as $value):
                            if($value['superior_id']==6):
                            ?>
                                <tr>
                                    <td><input type="checkbox" name='page[]' value="<?php echo $value['id']; ?>"/></td>
                                    <td><?php echo $value['pagename'];?></td>
                                </tr>
                                <?php
                                endif;
                                endforeach; ?>
                                </tbody>
                            </table>
                        </div>
                        <div class="widget-title"><a href="#collapseSix" data-toggle="collapse"> <span class="icon"><i
                                class="icon-arrow-right"></i></span>
                            <h5>权限管理</h5>
                        </a></div>
                        <div class="collapse" id="collapseSix">
                            <table class="table table-bordered table-striped with-check">
                                <thead>
                                </thead>
                                <tbody>
                                <?php
                            $rows=$data[0];
                            foreach($rows as $value):
                            if($value['superior_id']==7):
                            ?>
                                <tr>
                                    <td><input type="checkbox" name='page[]' value="<?php echo $value['id']; ?>"/></td>
                                    <td><?php echo $value['pagename'];?></td>
                                </tr>
                                <?php
                                endif;
                                endforeach; ?>
                                </tbody>
                            </table>
                        </div>
                        <div class="form-actions">
                            <button type="submit" class="btn btn-success">保存</button>
                        </div>
                    </div>
                    <input type="hidden" name="adminId" value="<?php echo $data[2]['id'] ?>"/>
                </form>
            </div>

        </div>
    </div>

</div>

</div>